﻿using Microsoft.AspNetCore.SignalR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace NetCoreCMS.Web
{
    public class NoticeHub:Hub
    {
        public async Task SendMessage(string message,string ip)
        {
            await Clients.All.SendAsync("OnMsg", DateTime.Now, message,ip);
        }
        public async Task LiveMessage(string message)
        {
            await Clients.All.SendAsync("OnLive", DateTime.Now.ToString("HH:MM"), message);
        }
    }
}
